import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/dashboard',
    },
    //单点登陆回调地址
    {
      path: '/sso',
      redirect: '../views/sso.vue',
    },
    // 此级别组件将“全屏显示”，不带header和侧边栏
    {
      path: '/',
      component: () => import('../views/common/Home'),
      meta: {
        title: 'UE模板库'
      },
      children: [ // 此级别组件将显示在header下面和侧边栏右边的区域
        // 表单
        {
          path: '/dashboard',
          component: () => import('../views/typical/Dashboard.vue'),
          meta: {
            title: '主控台'
          }
        },
        {
          path: '/basic-form',
          component: () => import('../views/typical/form/BasicForm.vue'),
          meta: {
            title: '基础表单'
          }
        },
        {
          path: '/Boxes-form',
          component: () => import('../views/typical/form/Boxes.vue'),
          meta: {
            title: '基础表单'
          }
        },
        {
          path: '/popover-form',
          component: () => import('../views/typical/form/PopoverForm.vue'),
          meta: {
            title: '带弹出框的表单'
          }
        },
        {
          path: '/scrolling-form',
          component: () => import('../views/typical/form/ScrollingForm.vue'),
          meta: {
            title: '多节表单'
          }
        },
        {
          path: '/nav-form',
          component: () => import('../views/typical/form/NavForm.vue'),
          meta: {
            title: '长页面导航'
          }
        },
        {
          path: '/tab-form-1-1',
          component: () => import('../views/typical/form/tab-form/TabForm1-1.vue'),
          meta: {
            title: '多tab页表单-1-1'
          },
          redirect: '/tab-form-1-1/1',
          children: [{
              path: '1',
              component: () => import('../views/typical/form/tab-form/form-1-1.vue'),
              meta: {
                title: '数据抽取'
              }
            },
            {
              path: '2',
              component: () => import('../views/typical/form/tab-form/form-2.vue'),
              meta: {
                title: '数据流开发'
              }
            },
            {
              path: '3',
              component: () => import('../views/typical/form/tab-form/form-3.vue'),
              meta: {
                title: '数据接口'
              }
            },
            {
              path: '4',
              component: () => import('../views/typical/form/tab-form/form-4.vue'),
              meta: {
                title: '数据直报'
              }
            },
            {
              path: '5',
              component: () => import('../views/typical/form/tab-form/form-5.vue'),
              meta: {
                title: '数据爬取'
              }
            },
            {
              path: '6',
              component: () => import('../views/typical/form/tab-form/form-6.vue'),
              meta: {
                title: '数据勘察'
              }
            },
          ]
        },
        {
          path: '/tab-form-1-2',
          component: () => import('../views/typical/form/tab-form/TabForm1-2.vue'),
          meta: {
            title: '多tab页表单-1-2'
          },
          redirect: '/tab-form-1-2/1',
          children: [{
              path: '1',
              component: () => import('../views/typical/form/tab-form/form-1-2.vue'),
              meta: {
                title: '数据抽取'
              }
            },
            {
              path: '2',
              component: () => import('../views/typical/form/tab-form/form-2.vue'),
              meta: {
                title: '数据流开发'
              }
            },
            {
              path: '3',
              component: () => import('../views/typical/form/tab-form/form-3.vue'),
              meta: {
                title: '数据接口'
              }
            },
            {
              path: '4',
              component: () => import('../views/typical/form/tab-form/form-4.vue'),
              meta: {
                title: '数据直报'
              }
            },
            {
              path: '5',
              component: () => import('../views/typical/form/tab-form/form-5.vue'),
              meta: {
                title: '数据爬取'
              }
            },
            {
              path: '6',
              component: () => import('../views/typical/form/tab-form/form-6.vue'),
              meta: {
                title: '数据勘察'
              }
            },
          ]
        },
        {
          path: '/tab-form-2-1',
          component: () => import('../views/typical/form/tab-form/TabForm2-1.vue'),
          meta: {
            title: '多tab页表单-2-1'
          },
          redirect: '/tab-form-2-1/1',
          children: [{
              path: '1',
              component: () => import('../views/typical/form/tab-form/form-1-1.vue'),
              meta: {
                title: '数据抽取'
              }
            },
            {
              path: '2',
              component: () => import('../views/typical/form/tab-form/form-2.vue'),
              meta: {
                title: '数据流开发'
              }
            },
            {
              path: '3',
              component: () => import('../views/typical/form/tab-form/form-3.vue'),
              meta: {
                title: '数据接口'
              }
            },
            {
              path: '4',
              component: () => import('../views/typical/form/tab-form/form-4.vue'),
              meta: {
                title: '数据直报'
              }
            },
            {
              path: '5',
              component: () => import('../views/typical/form/tab-form/form-5.vue'),
              meta: {
                title: '数据爬取'
              }
            },
            {
              path: '6',
              component: () => import('../views/typical/form/tab-form/form-6.vue'),
              meta: {
                title: '数据勘察'
              }
            },
          ]
        },
        {
          path: '/tab-form-2-2',
          component: () => import('../views/typical/form/tab-form/TabForm2-2.vue'),
          meta: {
            title: '多tab页表单-2-2'
          },
          redirect: '/tab-form-2-2/1',
          children: [{
              path: '1',
              component: () => import('../views/typical/form/tab-form/form-1-2.vue'),
              meta: {
                title: '数据抽取'
              }
            },
            {
              path: '2',
              component: () => import('../views/typical/form/tab-form/form-2.vue'),
              meta: {
                title: '数据流开发'
              }
            },
            {
              path: '3',
              component: () => import('../views/typical/form/tab-form/form-3.vue'),
              meta: {
                title: '数据接口'
              }
            },
            {
              path: '4',
              component: () => import('../views/typical/form/tab-form/form-4.vue'),
              meta: {
                title: '数据直报'
              }
            },
            {
              path: '5',
              component: () => import('../views/typical/form/tab-form/form-5.vue'),
              meta: {
                title: '数据爬取'
              }
            },
            {
              path: '6',
              component: () => import('../views/typical/form/tab-form/form-6.vue'),
              meta: {
                title: '数据勘察'
              }
            },
          ]
        },
        {
          path: '/step-form',
          component: () => import('../views/typical/form/StepForm.vue'),
          meta: {
            title: '分步表单'
          }
        },
        {
          path: '/tree-form',
          component: () => import('../views/typical/form/TreeForm.vue'),
          meta: {
            title: '左树右表单'
          }
        },
        {
          path: '/detail-form',
          component: () => import('../views/typical/form/DetailForm.vue'),
          meta: {
            title: '详情表单'
          }
        },
        {
          path: '/mixed-form',
          component: () => import('../views/typical/form/MixedForm.vue'),
          meta: {
            title: '混合表单'
          }
        },
        // 列表
        {
          path: '/basic-table',
          component: () => import('../views/typical/table/BasicTable.vue'),
          meta: {
            title: '普通'
          }
        },
        {
          path: '/selection-table',
          component: () => import('../views/typical/table/SelectionTable.vue'),
          meta: {
            title: '多选'
          }
        },
        {
          path: '/tree-table',
          component: () => import('../views/typical/table/TreeTable.vue'),
          meta: {
            title: '左树右列表'
          }
        },
        {
          path: '/radio-table',
          component: () => import('../views/typical/table/RadioTable.vue'),
          meta: {
            title: '单选列表'
          }
        },
        {
          path: '/mutiple-query-table',
          component: () => import('../views/typical/table/MutipleQueryTable.vue'),
          meta: {
            title: '多条件查询列表'
          }
        },
        {
          path: '/editable-table', //ExtendedAttributeManagement，扩展属性管理
          component: () => import('../views/typical/table/EditableTable.vue'),
          meta: {
            title: '可编辑列表'
          }
        },
        {
          path: '/scrolling-list',
          component: () => import('../views/typical/list/ScrollingList'),
          meta: {
            title: '滚动列表'
          }
        },
        {
          path: '/card-list',
          component: () => import('../views/typical/list/CardList'),
          meta: {
            title: '卡片列表'
          }
        },
        {
          path: '/dict-list',
          component: () => import('../views/typical/table/DictList'),
          meta: {
            title: '字典列表'
          }
        },
        {
          path: '/comprehensive',
          component: () => import('../views/typical/table/comprehensive/Comprehensive'),
          meta: {
            title: '多tab页表单-3'
          },
          redirect: '/comprehensive/1',
          children: [{
              path: '1',
              component: () => import('../views/typical/table/comprehensive/page-1'),
              meta: {
                title: '数据抽取'
              }
            },
            {
              path: '2',
              component: () => import('../views/typical/form/tab-form/form-2.vue'),
              meta: {
                title: '数据流开发'
              }
            },
            {
              path: '3',
              component: () => import('../views/typical/form/tab-form/form-3.vue'),
              meta: {
                title: '数据接口'
              }
            },
            {
              path: '4',
              component: () => import('../views/typical/form/tab-form/form-4.vue'),
              meta: {
                title: '数据直报'
              }
            },
            {
              path: '5',
              component: () => import('../views/typical/form/tab-form/form-5.vue'),
              meta: {
                title: '数据爬取'
              }
            },
            {
              path: '6',
              component: () => import('../views/typical/form/tab-form/form-6.vue'),
              meta: {
                title: '数据勘察'
              }
            },
          ]
        },
        // 工具箱
        {
          path: '/iframe',
          component: () => import('../views/typical/iframe/Iframe.vue'),
          meta: {
            title: 'iframe调用'
          }
        },
        {
          path: '/dialog-iframe',
          component: () => import('../views/typical/iframe/DialogIframe.vue'),
          meta: {
            title: '对话框iframe'
          }
        },
        {
          path: '/code-highlight',
          component: () => import('../views/typical/toolbox/CodeHighlight.vue'),
          meta: {
            title: '代码高亮'
          }
        },
        {
          path: '/transfer',
          component: () => import('../views/typical/toolbox/Transfer.vue'),
          meta: {
            title: '穿梭框'
          }
        },
        {
          path: '/unsure-form',
          component: () => import('../views/typical/toolbox/UnsureForm.vue'),
          meta: {
            title: '不确定表单'
          }
        },
        // {
        //   path: '/unsure-form-2', 
        //   component: () => import('../views/typical/toolbox/legacy_UnsureForm2.jsx'),
        //   meta: {
        //     title: '不确定表单2'
        //   }
        // },
        {
          path: '/keep-alive-page',
          component: () => import('../views/typical/toolbox/KeepAlivePage.vue'),
          meta: {
            title: '页面缓存'
          }
        },
        {
          path: '/validator-page',
          component: () => import('../views/typical/toolbox/ValidatorPage.vue'),
          meta: {
            title: '表单验证'
          }
        },
        {
          path: '/config-page',
          component: () => import('../views/typical/toolbox/ConfigPage.vue'),
          meta: {
            title: '外部配置项'
          }
        },
        //错误页面
        {
          path: '/demo-403',
          component: () => import('../views/typical/error/403.vue'),
          meta: {
            title: '403页面'
          }
        },
        {
          path: '/demo-404',
          component: () => import('../views/typical/error/404.vue'),
          meta: {
            title: '404页面'
          }
        },
        {
          path: '/demo-500',
          component: () => import('../views/typical/error/500.vue'),
          meta: {
            title: '500页面'
          }
        },
        {
          path: '/data-visualization-code',
          component: () => import('../views/typical/toolbox/DataVisualizationCode.vue'),
          meta: {
            title: '代码示例'
          }
        },

        /********************权责清单查询************************/
        {
          path:'/responsibility',
          name:'Responsibility',
          component:()=>import('../views/responsibility/Responsibility.vue'),
          meta:{
            title:'权责清单查询',
          }
        },
        /***业务菜单***/
          {
              path:'/overview',
              name:'overview',
              component:()=>import('../views/data/overview.vue'),
              meta:{
                  title:'数据总览',
              }
          },
          {
              path:'/integration',
              name:'integration',
              component:()=>import('../views/data/integration.vue'),
              meta:{
                  title:'数据整合',
              }
          },
          {
              path:'/assets',
              name:'assets',
              component:()=>import('../views/data/assets.vue'),
              meta:{
                  title:'数据资产',
              }
          },
          {
              path:'/shared',
              name:'shared',
              component:()=>import('../views/data/shared.vue'),
              meta:{
                  title:'数据共享',
              }
          }
      ]
    },
    // 例如登录组件就可以放在最外层
    // {
    //   path: '/login', // url为#/login
    //   component: () => import( '../components/page/Login.vue'),
    //   meta: {
    //     title: '登录'
    //   }
    // },

    {
      path: '/micro-module',
      component: () => import('../views/typical/dragDemo/MicroModule.vue'),
      meta: {
        title: '拖拽组件'
      }
    },

    {
      path: '/inner-page',
      component: () => import('../views/typical/iframe/InnerPage.vue'),
      meta: {
        title: '内部页面'
      }
    },
    {
      path: '/data-visualization',
      component: () => import('../views/typical/toolbox/DataVisualization.vue'),
      meta: {
        title: '数据可视化'
      }
    },
    {
      path: '/404',
      component: () => import('../views/typical/error/404.vue'),
      meta: {
        title: '404'
      }
    },
    {
      path: '*',
      redirect: '/404'
    }
  ]
});